event_channel: Fix uninitialised variable build error.
authorKeir Fraser <keir@xen.org>
Mon, 22 Nov 2010 08:29:03 +0000 (08:29 +0000)
committerKeir Fraser <keir@xen.org>
Mon, 22 Nov 2010 08:29:03 +0000 (08:29 +0000)
Signed-off-by: Yang Zhang <yang.z.zhang@intel.com>
Signed-off-by: Keir Fraser <keir@xen.org>
xen/common/event_channel.c

index 52ec7fc215a6b685f433052bac60dc9939cd7403..c4308ed8f7b5bcaf0980afff4ae153fe7a4a7370 100644 (file)
@@ -345,15 +345,14 @@ static long evtchn_bind_pirq(evtchn_bind_pirq_t *bind)
     chn = evtchn_from_port(d, port);
 
     d->pirq_to_evtchn[pirq] = port;
-    if ( !is_hvm_domain(d) )
+    rc = (!is_hvm_domain(d)
+          ? pirq_guest_bind(
+              v, pirq, !!(bind->flags & BIND_PIRQ__WILL_SHARE))
+          : 0);
+    if ( rc != 0 )
     {
-        rc = pirq_guest_bind(
-            v, pirq, !!(bind->flags & BIND_PIRQ__WILL_SHARE));
-        if ( rc != 0 )
-        {
-            d->pirq_to_evtchn[pirq] = 0;
-            goto out;
-        }
+        d->pirq_to_evtchn[pirq] = 0;
+        goto out;
     }
 
     chn->state  = ECS_PIRQ;